import 'package:flutter/material.dart';

Color primaryColor = Colors.blue[600]!;

class InedxBody extends StatefulWidget {
  const InedxBody({Key? key}) : super(key: key);

  @override
  _InedxBodyState createState() => _InedxBodyState();
}

class _InedxBodyState extends State<InedxBody> {
  String _firstLanguage = '英语';
  String _sencondLanguage = '中文(简体)';

  @override
  Widget build(BuildContext context) {
    return Container(
      height: 55.0,
      decoration: BoxDecoration(
          color: Colors.white,
          border: Border(
              bottom: BorderSide(
            width: 0.5,
            color: Colors.grey[500]!,
          ))),
      child: Row(
        crossAxisAlignment: CrossAxisAlignment.center,
        mainAxisAlignment: MainAxisAlignment.start,
        children: [
          Expanded(
              child: Material(
            color: Colors.white,
            child: InkWell(
              onTap: () {},
              child: Row(
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  Text(
                    this._firstLanguage,
                    style: TextStyle(color: primaryColor),
                  ),
                  ImageIcon(
                    AssetImage('images/spinner_blue.9.png'),
                    color: primaryColor,
                  ),
                ],
              ),
            ),
          )),
          Material(
            color: Colors.white,
            child: IconButton(
              icon: Icon(
                Icons.compare_arrows,
                color: primaryColor,
              ),
              onPressed: () {},
            ),
          ),
          Expanded(
              child: Material(
            color: Colors.white,
            child: InkWell(
              onTap: () {},
              child: Row(
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  Text(
                    this._sencondLanguage,
                    style: TextStyle(color: primaryColor),
                  ),
                  ImageIcon(
                    AssetImage('images/spinner_blue.9.png'),
                    color: primaryColor,
                  ),
                ],
              ),
            ),
          )),
        ],
      ),
    );
  }
}
